fun walk1To(action: (Int) -> Unit, n: Int) {
    (1..n).forEach { action(it) }
}

walk1To({ i -> println(i) }, 10)
walk1To({ i -> println(i + 10) }, 10)

fun walk2To(n: Int, action: (Int) -> Unit) {
    (1..n).forEach { action(it) }
}
walk2To(5) { print(it) }

fun walk3To(n: Int, action: (Int) -> Unit) = (1..n).forEach(action)

walk3To(10,::println)
